<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center editInfo_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub editInfo_fd0_0'>
          <view class='flex flex-wrap align-center editInfo_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  editInfo_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='editInfo_fd0_0_c1_c0'>{{type==1 ? '昵称' : '签名'}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end editInfo_fd0_0_c0' @click.stop="submit">
            <text class='editInfo_fd0_0_c2_c0'>确定</text>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-wrap editInfo_fd1_0' v-if="type==1">
          <benben-textarea class='flex editInfo_input_fd1_0' :placeholder="'请输入'" :adjust-position='true'
            :maxlength="10" :show-num='true' placeholder-style="color:#999;font-size:28rpx" v-model="fd1_0" />
          <template>
            <view class='flex flex justify-end editInfo_numberfd1_0_c0'>
              <text>{{fd1_0.length}}</text>
              <text>/</text>
              <text>10</text>
            </view>
          </template>
        </view>
        <view class='flex flex-wrap editInfo_fd1_0' v-else>
          <benben-textarea class='flex editInfo_input_fd1_0' :placeholder="'请输入'" :adjust-position='true'
            :maxlength="60" :show-num='true' placeholder-style="color:#999;font-size:28rpx" v-model="fd1_0" />
          <template>
            <view class='flex flex justify-end editInfo_numberfd1_0_c0'>
              <text>{{fd1_0.length}}</text>
              <text>/</text>
              <text>60</text>
            </view>
          </template>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "fd1_0": "",
        type: 1
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      this.type = options.type
      this.fd1_0 = options.name
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      submit() {
        if (this.type == 1) {
          uni.$emit('nickname', this.fd1_0)
          uni.navigateBack()
        }
        if (this.type == 2) {
          uni.$emit('autograph', this.fd1_0)
          uni.navigateBack()
        }
      },
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .editInfo_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .editInfo_fd0_0_c2_c0 {
    font-size: 32rpx;
    color: rgba(23, 107, 232, 1);
  }

  .editInfo_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .editInfo_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .editInfo_fd0_0_c0 {
    width: 120rpx;
  }

  .editInfo_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .editInfo_numberfd1_0_c0 {
    width: 100%;
    font-size: 24rpx;
    color: var(--benbenFontColor0);
    line-height: 46rpx;
    font-weight: 400;
  }

  .editInfo_input_fd1_0 {
    width: 100%;
    height: 140rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #333;
    white-space: pre-wrap;
  }

  .editInfo_fd1_0 {
    background: rgba(246, 247, 249, 1);
    width: 686rpx;
    border-radius: 16rpx;
    padding: 24rpx;
    margin: 24rpx auto 24rpx auto;
  }
</style>
